Along with a wide use of an intranet, the internet, or the like, network traffic is significantly increased. Therefore, a capability of efficiently transferring various types of data having large amounts is important. As a technology for efficiently transferring the various types of data having the large amounts, a shaping apparatus that limits a packet whose transmission is requested (or, other various types of data) to a specified band (rate) and performs a smoothing thereon to output the packet is used.
For example, as the shaping apparatus, an output scheduling type shaping apparatus that performs a scheduling (that is, band limiting) when the packet is output from the shaping apparatus is proposed. An example of the output scheduling type shaping apparatus includes a traffic shaping apparatus using a token bucket model. In the token bucket model, tokens are accumulated in a token bucket at a rate in accordance with a desired band. In a case where a read request on the packets written in a buffer is issued, the size of the packet whose read is requested is compared with a current token amount accumulated in the token bucket. In a case where the token amount is smaller than the size of the packet whose read is requested, the packet is not read until the token amount becomes larger than or equal to the size of the packet whose read is requested. On the other hand, if the token amount is larger than or equal to the size of the packet whose read is requested, the packet is read, and also the tokens are deleted by the amount corresponding to the size of the packet from the tokens accumulated in the token bucket.
In the output scheduling type shaping apparatus, in a case where packet read requests are issued from a plurality of buffers at once, while following a predetermined rule (for example, round-robin, strict priority queuing, or the like), the buffer where a read processing is actually performed is sequentially selected one by one. In the buffer where the timing for performing the read processing is delayed, the tokens are accumulated also while waiting for the read processing, and the delay in the timing for performing the read processing can be retrieved later. However, in a case where the read requests are issued from too many buffers at the same time, the tokens accumulated in the token bucket while waiting for the read processing may exceed the size of the token bucket. Therefore, the accumulation of the tokens discontinues, which leads to a decrease in throughput as a result.
In view of the above, Japanese Unexamined Patent Application Publication No. 2006-197235 discloses an input scheduling type shaping apparatus that performs a scheduling when the packet is input to the shaping apparatus. For example, the input scheduling type shaping apparatus is provided with a buffer unit that stores the input packet and a time table that is notched in time slots of a fixed size (to be specific, 64 bytes that is the minimum packet length for ETHERNET). The shaping apparatus calculates an ideal output ending time for a new input packet on the basis of a previous packet output ending time and a desired transmission rate and also enters the new input packet to the next time slot after the previous packet output ending time. By adjusting an interval of the time slots in which the packet is entered, an appropriate shaping is realized. For example, in a case where an attention is paid on a certain one flow, when a packet having a large size arrives, a packet arriving next is entered in a further later time slot, and when a packet having a small size arrives, a packet arriving next is entered in a further nearer time slot.